﻿@model LCMS_MVC.Models.QueryModel
           
@{
    ViewBag.Title = "Index";
}

    <h2>Learning Object Course Creation</h2>
    @using (Html.BeginForm("Index", "Query", FormMethod.Post))
    {
        <fieldset>
            <input id="txtURI" name="txtURI" type="text" />
            <input id="SubmitButton" type="submit" value="Query!" />
        </fieldset>
    }



    <table>
        <tr>
            <th>
                Subject
            </th>    
            <th>
                Predicate
            </th>
            <th>
                Object
            </th>
        </tr>

    @if (HttpContext.Current.Request.HttpMethod == "POST")
    {
        foreach (var triple in Model._outputGraph.Triples)
        {   
            <tr>
                <td>
                    @triple.Subject
                </td>
                <td>
                    @triple.Predicate
                </td>
                <td>
                    @triple.Object
                </td>
            </tr>
        }
    }
    </table>